package com.sport.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.sport.model.dto.Option;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_user")
public class SysUser extends BaseEntity implements Serializable, Cloneable{
    /**
     * 登录账号
     */
    @Schema(title = "用户名",description = "登录账号")
    private String username;
    /**
     * 密码
     */
    @Schema(title = "密码",description = "登录密码")
    private String password;
    /**
     * 用户的密码盐
     */
    @Schema(hidden = true)
    private String salt;
    /**
     * 性别;0男1女2未知,默认未知
     */
    @Schema(title = "性别",description = "0男1女2未知,默认未知")
    private Integer sex;
    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickname;
    /**
     * 电话
     */
    @Schema(description = "电话")
    private String phone;
    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    private String email;
    /**
     * 头像
     */
    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "角色列表")
    @TableField(exist = false)
    private List<Option> roles;
}